import vue from 'vue'
import Vuex from 'Vuex'

vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // token: '/QYLgfVMMvoesuDj5DVW2mWzlyNe9C1gvsTm9YtQ678=',
    token: 'qxvopvD9A5gCW49qfR1so4YoUgjYHgxAPkDIHeGtyUo=',
    ids: '0000', //
    distance: '0',
    loading: false
  },
  // store 同步应用
  mutations: {
    set_token (state, params) {
      state.token = params
    },
    updateIds (state, msg, msg2) {
      state.ids = msg
      state.distance = msg2
    },
    showLoading (state) {
      state.Loading = true
    },
    hideLoading (state) {
      state.Loading = false
    }
  },
  // store 异步应用
  actions: {
  }
})
